package com.wise.summer.v1.cms.content.products;

import com.wise.framework.annotations.ApiInfo;
import com.wise.framework.annotations.SkipUserAuth;
import com.wise.framework.daoannotations.Column;
import com.wise.framework.summer.BasicSummer;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Tolerate;

import java.util.List;
import java.util.Map;

/**
 * @author shaoming
 * @date 2019-09-09
 */
@Getter
@Setter
//@Publish
@SkipUserAuth
@ApiInfo("查询产品列表")
public class ListProducts extends BasicSummer<ListProducts.Result> {

	@ApiInfo("产品类别Id")
	private List<Object> categoryIds;

	@Getter
	@Setter
	@Builder
	public static class ProductResult {
		@Tolerate
		public ProductResult() {

		}

		@ApiInfo("产品ID")
		@Column("id")
		private String id;

		@ApiInfo("产品名")
		@Column("name")
		private String name;

		@ApiInfo("产品图片url")
		@Column("url")
		private String url;

		@ApiInfo("微页面地址")
		@Column("page_id")
		private String pageId;

		@ApiInfo("推荐")
		@Column("recommend")
		private boolean recommend;

		@Column("sort")
		private Integer sort;

		@Column("category_id")
		private String categoryId;

		@ApiInfo("路由ID")
		@Column("route_id")
		private String routeId;

		@ApiInfo("草稿")
		@Column("draft")
		private String draft;

		@ApiInfo("网页标题")
		@Column("page_title")
		private String pageTitle;

		@ApiInfo("seo describe")
		@Column("seo_describe")
		private String seoDescribe;

	}

	@Getter
	@Setter
	@Builder
	public static class Result {
		@Tolerate
		public Result() {

		}

		private List<ProductResult> newRecommendProducts;
		private Map<String, List<ProductResult>> productList4Category;
		private Map<String, List<ProductResult>> productList4Industry;
	}
}
